package com.zyg.apart.service;

import com.github.pagehelper.PageInfo;
import com.zyg.apart.model.Role;
import com.zyg.apart.model.User;
import com.zyg.apart.view.LoginUser;
import org.springframework.stereotype.Repository;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

@Repository
public interface UserService {
    boolean login(LoginUser loginUser, HttpServletRequest request);

    Role getRoleByName(String username);

    Map<String,Object> getUserById(Integer id);

    int editUser(User user);

    int addUser(User user);

    PageInfo<Map<String, Object>> getAllUsers(Integer currentPage);

    int delUserById(Integer id);

}
